package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum CheckDetailStatusEnum {
    DRAFT(0, "草稿"),
    COMMIT(1, "提交"),
    WRITE_OFF(2, "已核销"),

    ;

    private final Integer code;
    private final String msg;

    public static String getDesc(String code) {
        for (CheckDetailStatusEnum businessEnum : CheckDetailStatusEnum.values()) {
            if (Objects.equals(businessEnum.getCode(), code)) {
                return businessEnum.getMsg();
            }
        }
        return "";
    }
}

